MyAvd=MyAvd01
MyActivity=android.intent.action.ANDROIDCLIENT
MyPackage=com.fsk.androidclient
MyProject=androidClient

all: msgs
	ant debug

release:
	ant release
	jarsigner -verbose -keystore ../FSK/fsk.keystore ./bin/${MyProject}-unsigned.apk fsk
	mv bin/${MyProject}-unsigned.apk bin/${MyProject}-release.apk
	jarsigner -verify -verbose bin/${MyProject}-release.apk

runtest:
	adb shell monkey -v -p com.fsk.${MyProject} 10000


setup:
	emulator -avd ${MyAvd} &
	xterm -geometry 150x20+0+0 -e "adb logcat" &

run:
	adb install -r ./bin/${MyProject}-debug-unaligned.apk
	adb shell am start -a ${MyActivity} -n ${MyPackage}/${MyPackage}.${MyProject}

msgs:
	${SH} protoc --java_out=./src --proto_path=.. ../fsk.msg.messages.proto

clean:
	ant clean
	adb shell rm data/app/${MyPackage}.apk
